package com.wc.算法提高课.E第五章_数学知识.约数个数.樱花;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/10/4 10:45
 * @description https://www.acwing.com/problem/content/description/1296/
 */
public class Main {
    /**
     * 思路：
     * 分析
     * 1 / x + 1 / y = 1 / n!<p>
     * =>
     * 1 / y = 1 / n! - 1 / x<p>
     * = (x - n!) / (x * n!)<p>
     * =>
     * y<p>
     * = x * n! / (x - n!)<p>
     * = (x - n! + n!) * n! / (x - n!)<p>
     * = n! + (n! ^ 2) / (x - n!)<p>
     * 因为 x, y 为正整数<p>
     * 那么(x - n!) 一定是 n! ^ 2 的约数<p>
     * 等价于有n! ^ 2的约数个数 个 数对<p>
     * 推导完毕, 开始代码<p>
     */
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    private static final int P = (int) 1e9 + 7, N = 1000010;
    static int[] primes = new int[N];
    static boolean[] st = new boolean[N];
    static int n, cnt = 0;

    public static void main(String[] args) {
        n = sc.nextInt();
        ola(n);
        long res = 1;
        for (int i = 0; primes[i] <= n && i < cnt; i++) {
            int x = n, s = 0;
            while (x > 0) {
                s += x / primes[i];
                x /= primes[i];
            }
            res = res * (1 + 2L * s) % P;
        }
        out.println(res);
        out.flush();
    }

    static void ola(int n) {
        st[0] = st[1] = true;
        for (int i = 2; i <= n; i++) {
            if (!st[i]) primes[cnt++] = i;
            for (int j = 0; i * primes[j] <= n; j++) {
                st[i * primes[j]] = true;
                if (i % primes[j] == 0) break;
            }
        }
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}
